#ifndef MYQGSMAPTOOLPAN_H
#define MYQGSMAPTOOLPAN_H

#include <qgsmapcanvas.h>
#include <qgsmaptoolpan.h>


// 自定义平移等操作
class MyQgsMapToolPan : public QgsMapToolPan
{
public:
    explicit MyQgsMapToolPan(QgsMapCanvas* canvas);
protected:
    void canvasPressEvent( QgsMapMouseEvent *e ) override;
    //void canvasMoveEvent( QgsMapMouseEvent *e ) override;
    void canvasReleaseEvent( QgsMapMouseEvent *e ) override;
private:
    bool mDrag = false;
    QPoint mLastMousePos;
};

#endif // MYQGSMAPTOOLPAN_H
